package com.cn.hangyun.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cn.hangyun.common.CustomerContextHolder;
import com.cn.hangyun.dao.UserMapper;
import com.cn.hangyun.model.User;
import com.cn.hangyun.service.IUserService;

@Service("userService")
public class UserServiceImpl implements IUserService {

	private UserMapper userMapper;

	public UserMapper getUserMapper() {
		return userMapper;
	}

	@Autowired
	public void setUserMapper(UserMapper userMapper) {
		this.userMapper = userMapper;
	}

	@Override
	public User getUserById(String id) {
		//CustomerContextHolder.clearCustomerType();
		CustomerContextHolder.setCustomerType(CustomerContextHolder.DATA_SOURCE_MYSQL);
		return userMapper.selectByPrimaryKey(Integer.valueOf("3"));
	}

	@Override
	public List<User> getAll() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<User> getAll2() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<User> getAll3() {
		// TODO Auto-generated method stub
		return null;
	}

}
